/**
 * @author 赵希奥
 * @date 2022/4/20 22:25
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 * 抽象组件类, 充当抽象同事类
 */
public abstract class Component {
    protected Mediator mediator;

    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }

    // 转发调用
    public void changed() {
        mediator.componentChanged(this);
    }

    public abstract void update();
}
